<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Global s1</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../xpressive/reference.html#doxygen.regex__primitives_8hpp" title="Header &lt;boost/xpressive/regex_primitives.hpp&gt;">
<link rel="prev" href="namespaceboost_1_1xpressive_1a13c6bb573901cb7e82386a4616ab4dd2.html" title="Global s0">
<link rel="next" href="namespaceboost_1_1xpressive_1a1f240bb30623f86f70e07f05bbd7b086.html" title="Global s2">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="namespaceboost_1_1xpressive_1a13c6bb573901cb7e82386a4616ab4dd2.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../xpressive/reference.html#doxygen.regex__primitives_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="namespaceboost_1_1xpressive_1a1f240bb30623f86f70e07f05bbd7b086.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.namespaceboost_1_1xpressive_1ad80f6f2e945d16adb777f6c5c05c32ba"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Global s1</span></h2>
<p>boost::xpressive::s1 — Sub-match placeholder, like $1 in perl. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../xpressive/reference.html#doxygen.regex__primitives_8hpp" title="Header &lt;boost/xpressive/regex_primitives.hpp&gt;">boost/xpressive/regex_primitives.hpp</a>&gt;

</span><a class="link" href="structboost_1_1xpressive_1_1mark__tag.html" title="Struct mark_tag">mark_tag</a> <span class="keyword">const</span> s1<span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.44.5.10.35.4"></a><h2>Description</h2>
<p>To create a sub-match, assign a sub-expression to the sub-match placeholder. For instance, (s1= _) will match any one character and remember which character was matched in the 1st sub-match. Later in the pattern, you can refer back to the sub-match. For instance, (s1= _) &gt;&gt; s1 will match any character, and then match the same character again.</p>
<p>After a successful <a class="link" href="namespaceboost_1_1xpressive_1a7549c8bcd5ce2471d42aaad4e409d148.html" title="Function regex_match">regex_match()</a> or <a class="link" href="namespaceboost_1_1xpressive_1a1194c854fb35ddb2d0b216a303263bb3.html" title="Function regex_search">regex_search()</a>, the sub-match placeholders can be used to index into the <a class="link" href="structboost_1_1xpressive_1_1match__results.html" title="Struct template match_results">match_results</a>&lt;&gt; object to retrieve the Nth sub-match. </p>
</div>
</div>
<div class="copyright-footer">Copyright © 2007 Eric Niebler<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="namespaceboost_1_1xpressive_1a13c6bb573901cb7e82386a4616ab4dd2.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../xpressive/reference.html#doxygen.regex__primitives_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="namespaceboost_1_1xpressive_1a1f240bb30623f86f70e07f05bbd7b086.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
